Keep the cell_list in a consistent state while iterating over it, since
authorMatthias Clasen <maclas@gmx.de>
Fri, 12 Mar 2004 23:23:28 +0000 (23:23 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 12 Mar 2004 23:23:28 +0000 (23:23 +0000)
Sat Mar 13 00:07:51 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear):
Keep the cell_list in a consistent state while iterating over it,
since clear_attributes() also iterates over it.  (another instance
of #136585, Morten Welinder)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktreeviewcolumn.c

index 8bdae200124d3000390faebe8567b0d2e14e4a88..238ec8d48cd47d05b87c4aa16ffd22c50c87393b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Mar 13 00:07:51 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear): 
+       Keep the cell_list in a consistent state while iterating over it, 
+       since clear_attributes() also iterates over it.  (another instance
+       of #136585, Morten Welinder)
+       
 Fri Mar 12 17:20:15 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkarrow.c (gtk_arrow_expose): Swap GTK_ARROW_LEFT
index 8bdae200124d3000390faebe8567b0d2e14e4a88..238ec8d48cd47d05b87c4aa16ffd22c50c87393b 100644 (file)
@@ -1,3 +1,10 @@
+Sat Mar 13 00:07:51 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear): 
+       Keep the cell_list in a consistent state while iterating over it, 
+       since clear_attributes() also iterates over it.  (another instance
+       of #136585, Morten Welinder)
+       
 Fri Mar 12 17:20:15 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkarrow.c (gtk_arrow_expose): Swap GTK_ARROW_LEFT
index 8bdae200124d3000390faebe8567b0d2e14e4a88..238ec8d48cd47d05b87c4aa16ffd22c50c87393b 100644 (file)
@@ -1,3 +1,10 @@
+Sat Mar 13 00:07:51 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear): 
+       Keep the cell_list in a consistent state while iterating over it, 
+       since clear_attributes() also iterates over it.  (another instance
+       of #136585, Morten Welinder)
+       
 Fri Mar 12 17:20:15 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkarrow.c (gtk_arrow_expose): Swap GTK_ARROW_LEFT
index 8bdae200124d3000390faebe8567b0d2e14e4a88..238ec8d48cd47d05b87c4aa16ffd22c50c87393b 100644 (file)
@@ -1,3 +1,10 @@
+Sat Mar 13 00:07:51 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear): 
+       Keep the cell_list in a consistent state while iterating over it, 
+       since clear_attributes() also iterates over it.  (another instance
+       of #136585, Morten Welinder)
+       
 Fri Mar 12 17:20:15 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkarrow.c (gtk_arrow_expose): Swap GTK_ARROW_LEFT
index 8bdae200124d3000390faebe8567b0d2e14e4a88..238ec8d48cd47d05b87c4aa16ffd22c50c87393b 100644 (file)
@@ -1,3 +1,10 @@
+Sat Mar 13 00:07:51 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear): 
+       Keep the cell_list in a consistent state while iterating over it, 
+       since clear_attributes() also iterates over it.  (another instance
+       of #136585, Morten Welinder)
+       
 Fri Mar 12 17:20:15 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkarrow.c (gtk_arrow_expose): Swap GTK_ARROW_LEFT
index 88c299f93be3078f7ca0b933c63ea5bb157b8be0..97da32019b22086c643a36e15270017568d121be 100644 (file)
@@ -663,17 +663,16 @@ gtk_tree_view_column_cell_layout_clear (GtkCellLayout *cell_layout)
   g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (cell_layout));
   column = GTK_TREE_VIEW_COLUMN (cell_layout);
 
-  for (list = column->cell_list; list; list = list->next)
+  while (column->cell_list)
     {
-      GtkTreeViewColumnCellInfo *info = (GtkTreeViewColumnCellInfo *)list->data;
+      GtkTreeViewColumnCellInfo *info = (GtkTreeViewColumnCellInfo *)column->cell_list->data;
 
-      gtk_tree_view_column_clear_attributes (column, info->cell);
-      g_object_unref (info->cell);
+      gtk_tree_view_column_cell_layout_clear_attributes (cell_layout, info->cell);
+      g_object_unref (G_OBJECT (info->cell));
       g_free (info);
+      column->cell_list = g_list_delete_link (column->cell_list, 
+                                             column->cell_list);
     }
-
-  g_list_free (column->cell_list);
-  column->cell_list = NULL;
 }
 
 static void